package com.andy.util;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

public class AndyUtil {
	public static void main(String[] args) {
		String str = "2018052317xvnkwu529cafx6s061ss0nw修改2-探析网络直播在各大领域异军突起的问题与治理对策.pdf"; // 默认环境，已是UTF-8编码
		try {
			String strGBK = URLEncoder.encode(str, "UTF-8");
			System.out.println(strGBK);
			String strUTF8 = URLDecoder.decode(str, "UTF-8");
			System.out.println(strUTF8);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
	}
}